package com.kingdee.eas.hr.affair.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.common.EASBizException;



public abstract class AbstractResignBillStateFacadeControllerBean extends AbstractBizControllerBean implements ResignBillStateFacadeController
{
    protected AbstractResignBillStateFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("C3FD1F61");
    }

    public String changeOnState(Context ctx, BOSUuid billId, String node, String isPerson, String hrbp) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00110d3c-7992-48bb-9cb2-cc9db5a87f93"), new Object[]{ctx, billId, node, isPerson, hrbp});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_changeOnState(ctx, billId, node, isPerson, hrbp);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _changeOnState(Context ctx, BOSUuid billId, String node, String isPerson, String hrbp) throws BOSException, EASBizException
    {    	
        return null;
    }

    public void sendEmailOrMessage(Context ctx, BOSUuid billId, String messageNum, String emailNum) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d2091424-7fd0-4ee2-a4ed-6e1592c298d7"), new Object[]{ctx, billId, messageNum, emailNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _sendEmailOrMessage(ctx, billId, messageNum, emailNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _sendEmailOrMessage(Context ctx, BOSUuid billId, String messageNum, String emailNum) throws BOSException, EASBizException
    {    	
        return;
    }

    public void abortBizBill(Context ctx, BOSUuid billid) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("547b458b-901b-4f0b-b018-1548e1ba3245"), new Object[]{ctx, billid});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _abortBizBill(ctx, billid);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _abortBizBill(Context ctx, BOSUuid billid) throws BOSException
    {    	
        return;
    }

}